<?php

namespace App\Observers;

use App\Models\Commodity;

// creating, created, updating, updated, saving,
// saved,  deleting, deleted, restoring, restored

class CommodityObserver
{
    public function saving(Commodity $commodity)
    {
        $commodity->introduce = clean($commodity->introduce, 'introduce');

        $commodity->excerpt = make_excerpt($commodity->introduce);
    }
}
